home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 009 / dos31pat.arc / DOS31.PAT < prev   
Encoding:
Text File  |  1985-08-25  |  11.1 KB  |  311 lines

  1.  
  2.                   The CompuServe IBMPC SIG Users Group
  3.                   ------------------------------------
  4.                          PATCHES FOR IBM DOS 3.1 
  5.                          -----------------------
  6.  
  7.  
  8.    ************************************************************************
  9.  
  10.      Note: In the patches which follow, it is assumed the user is familiar
  11.      with the use of DEBUG.  The notation "xxxx" means "anything is ok".
  12.      The notation <cr> means press Enter. 
  13.  
  14.    ************************************************************************
  15.  
  16.  
  17.  
  18.    FIXED DISK CLUSTER SIZE
  19.  
  20.      If you have a 10 Meg hard disk, the following information collated by
  21.    Bill Higgins, provides for 2K clusters instead of the standard 4K
  22.    clusters.  Typically, you will free up about 10% of the disk space you
  23.    are currently using.
  24.  
  25.            2K Cluster Size for 10MB Fixed Disks under DOS 3.1
  26.  
  27.       Standard 10mb fixed disks formatted under DOS 3.1 utilize 4k clusters
  28.    (i.e., the minimum space allocated to any file is 4096 bytes), while
  29.    drives 20mb and larger utilize 2k clusters.  I use a PC with twin 10mb
  30.    drives under DOS 3.1.  Since I have a multitude of small files on these
  31.    disks, the smaller allocation unit's space saving advantage far outweighs
  32.    any theoretical disadvantage of additional overhead for DOS to handle the
  33.    added allocation units.
  34.  
  35.      With the help of Bob Morse, SysOps Jim Gainsley, and Conrad Kageyama,
  36.    and the DOS Technical Reference, I was able to make the changes necessary
  37.    to use 2k clusters on both of my 10mb drives.  By following the
  38.    step-by-step instructions below, you will be able to make the switch to
  39.    2k clusters yourself.
  40.  
  41.     NOTE: THE FOLLOWING PROCEDURE WILL DESTROY ALL DATA ON THE FIXED DISK!!!
  42.  
  43.    You will need the following:
  44.  
  45.    (1) IBM PC-DOS version 3.1 (3.0 appears NOT to work).
  46.  
  47.    (2) A disk utility such as DISK REPAIR (a part of the IBM PROFESSIONAL 
  48.        DEBUG FACILITY), or DISMOD (a USS program, available on many BBS's),
  49.        or equivalent.  Note: You will not need this, if you use the 
  50.        Alternate Method in #4a below.
  51.  
  52.    Most critical to the process is the sequence in which this procedure is
  53.    attempted.  Here is the 4k to 2k cluster procedure:
  54.  
  55.    (1)  Do a complete backup of the fixed disk, using your current version
  56.         of DOS.
  57.  
  58.    (2)  Cold boot DOS 3.1, run FDISK to create or be sure that a DOS
  59.         partition exists on the Fixed Disk.
  60.  
  61.    (3)  Format the fixed disk using the DOS 3.1 FORMAT.COM program.  Do NOT
  62.         use any parameters (no /s or /v).
  63.  
  64.    (4)  Using your disk utility, select the boot sector and view it.
  65.         See below for an explanation of the pertinent info in this sector.
  66.         At location AA below, you should see a value of 08 which is the
  67.         number of sectors per cluster.  Change this to 04.
  68.  
  69.         At location BB below, you should see a value of 0800 which is the
  70.         number of sectors per fat (in hex Word format).  Change this to 1500.
  71.         The results should appear as in CC and DD below.
  72.  
  73.         All changes to the fat sectors required for 2k clusters will be
  74.         accomplished by the subsequent format in instruction 6 below.  No
  75.         other manual changes are required.
  76.  
  77.                             --------------------
  78.  
  79.         Example of first few bytes in the Boot Sector of the fixed disk,
  80.         displayed in hex format, after formatting with DOS 3.1, and prior
  81.         to 2k cluster size changes:  (The bytes of interest are located at
  82.         Boot sector Offsets 0Dh = Sectors per cluster, and 16h = Sectors
  83.         per FAT.)
  84.  
  85.              EB299049 424D2020 332E3100 02080100 020002F3 50F80800
  86.                                           ^^                  ^^^^
  87.                                           AA                   BB
  88.  
  89.           After the 2k cluster size changes:
  90.  
  91.              EB299049 424D2020 332E3100 02040100 020002F3 50F81500
  92.                                           ^^                  ^^^^
  93.                                           CC                   DD
  94.  
  95.         Where the data elements directly above AA are sectors per cluster,
  96.         and above BB are sectors per FAT.
  97.  
  98.  
  99.         (4a) Alternate Method:
  100.  
  101.              If you would rather, and if you are familiar with the operation
  102.              of Debug, the following method can be used.
  103.  
  104.                 Under DOS 3.1, do:
  105.  
  106.                   DEBUG
  107.                   -L 0 n 0 1 <cr>
  108.                   -E 0D <cr>
  109.                   xxxx:0D  08.04 <cr>
  110.                   -E 16 <cr>
  111.                   xxxx:16  08.15 <cr>
  112.                   -W 0 n 0 1 <cr>
  113.                   -Q
  114.  
  115.                   where, n = the fixed disk drive as follows:
  116.                              If fixed disk is drive  B  then  n=1
  117.                                         "            C   "    n=2
  118.                                         "            D   "    n=3
  119.                                         "            E   "    n=4
  120.  
  121.               NOTE: Be *really* careful when you do the L and W commands in
  122.                     the foregoing sequence.  Would be best to check your
  123.                     work by doing DEBUG, then
  124.  
  125.                              -L 0 n 0 1 <cr>   then doing
  126.                              -D 0D L1 <cr>     and
  127.                              -D 16 L1 <cr>     making sure that the results
  128.                                                are 04 & 15 respectively.
  129.                                                Then exit by doing
  130.                              -Q
  131.  
  132.                             -------------------
  133.  
  134.       A more detailed explanation of these two changes:
  135.  
  136.         The number of sectors per cluster would change from 08 to 04, since
  137.         that's what this is all about.  The sectors per FAT will change, in
  138.         order to accomodate (1) the increased number of possible FAT
  139.         entries, and (2) the increased size of each fat entry which will be
  140.         in 16-bit format instead of the former 12-bits.  The value to use for
  141.         a 10 meg & 2k clusters would be 21 sectors, or 1500 in hex word
  142.         format. (In this case the 15 is all that counts. 15 hex = 21 decimal.)
  143.  
  144.  
  145.    (5)  Exit the disk utility and do a cold boot with DOS 3.1.  This is
  146.         critical, since the boot sector is read by DOS only once, at boot
  147.         time, in order to build the BIOS  Parameter Block.  Having different
  148.         info in the boot sector than what's in the memory-resident BPB will
  149.         give UNPREDICTABLE RESULTS.
  150.  
  151.   The following is safest way to preceed.  Please use it.
  152.  
  153.    (6)  Reformat the drive using the DOS 3.1 FORMAT.COM, 
  154.  
  155.              FORMAT C: /S
  156.  
  157.         (You may also include  /V, if you wish to include a volume label.) 
  158.  
  159.              DOS 3.1 FORMAT will NOT affect your changes to the boot 
  160.              sector.  (This a change from DOS 3.0 FORMAT, which re-writes
  161.              the boot sector.)
  162.  
  163.    (7)  Restore your files, BEING SURE TO USE the RESTORE parameter, /P
  164.         which prompts before restoring system files.  
  165.  
  166.         **** WARNING ****
  167.  
  168.         YOU MUST NOT ALLOW THE TWO SYSTEM FILES, IBMBIO.COM AND IBMDOS.COM 
  169.         TO BE RESTORED, EVEN IF THEY ARE DOS 3.1 !!!  IF YOU DO, THEY WILL 
  170.         NOT BE PUT IN THE PROPER LOCATIONS AND YOUR FIXED DISK WILL NOT BE
  171.         BOOTABLE AND YOU WILL HAVE TO REFORMAT !!!
  172.  
  173.         Avoid restoring an earlier version of COMMAND.COM, but if you do
  174.         restore an earlier version, nothing is lost, just be sure to copy 
  175.         a 3.1 version over it afterwards.  You should now be operational 
  176.         again, with 2k clusters.
  177.  
  178.  
  179.    Further info on the entries in the boot sector entries used to build
  180.    the BIOS Parameter Block can be found in the DOS 3.1 Technical
  181.    Reference, Page 2-28.  Of course, I cannot warrant that this change
  182.    will work for all controller/disk combinations, particularly for
  183.    controllers and drives which are not 'XT clones' though it 'should
  184.    work' for all drives compatible enough to work under DOS 3.1.
  185.  
  186.         Comments to:  -- Bill Higgins  [70575,307]  CIS, IBMPC SIG --
  187.  
  188.  
  189.    **********************************************************
  190.  
  191.  
  192.    ENVIRONMENT SIZE
  193.  
  194.      Thanks to Bob Morse, the environment size can be patched as follows:
  195.  
  196.    DEBUG COMMAND.COM
  197.    -E 0D11<cr>
  198.    xxxx:0D11  0A.1E<cr>
  199.    -W<cr>
  200.    -Q<cr>
  201.  
  202.    (1E is for a 544 byte nominal size. Use 3C for a 1K size.)
  203.  
  204.    *********************************************************
  205.  
  206.    SCREEN SCROLLING
  207.  
  208.      From Ward Christensen, the ANSI.SYS scrolling patches to disable the
  209.    wait for retrace and the screen blanking have new addresses but they
  210.    work just fine.  Using DEBUG, proceed as follows:
  211.  
  212.    DEBUG ANSI.SYS
  213.    -E 02E3<cr>
  214.    xxxx:02E3   74.90  FB.90<cr>
  215.    -E 02EA<cr>
  216.    xxxx:02EA   EE.90<cr>
  217.    -W<cr>
  218.    -Q<cr>
  219.  
  220.    **********************************************************
  221.  
  222.    DISABLE EDLIN AUTOMATIC .BAK FILE CREATION
  223.  
  224.      On a BBS I found the patch from an unknown author to disable the
  225.    automatic .BAK file when using EDLIN.  Using DEBUG proceed as follows:
  226.  
  227.    DEBUG EDLIN.COM
  228.    -E 0CD5<cr>
  229.    xxxx:0CD5   56.41<cr>
  230.    -W<cr>
  231.    -Q<cr>
  232.  
  233.    **********************************************************
  234.  
  235.    AUTOMATIC INSTALLATION OF PRINTER FOR DOS PRINT
  236.  
  237.      Also on a BBS I found the patch by an unidentified author to PRINT.COM 
  238.    to obviate the need to type the desired printer port.   If the printer 
  239.    port is LPT1, then using DEBUG proceed as follows:
  240.  
  241.    DEBUG PRINT.COM
  242.    -E 1788<cr>
  243.    xxxx:1788   E8.90  CB.90  02.90<cr>
  244.    -E 179A<cr>
  245.    xxxx:179A   CD.90  21.90<cr>
  246.    -W<cr>
  247.    -Q<cr>
  248.  
  249.    If the printer port is LPT2 then the following address must ALSO be
  250.    modified as follows:
  251.  
  252.    -E 10CA 4 "LPT2"
  253.  
  254.    *********************************************************
  255.  
  256.    DISABLE AUTOMATIC HEADER IN FIND.EXE OUTPUT
  257.  
  258.     The FIND program puts an automatic header  ---------- filename  in the
  259.    output listing.  To disable this header, patch FIND.EXE as follows:
  260.  
  261.    REN FIND.EXE FIND.TMP
  262.  
  263.    DEBUG FIND.TMP
  264.    -E 0424<cr>
  265.    xxxx:0424   03.2C<cr>
  266.    -W<cr>
  267.    -Q<cr>
  268.  
  269.    REN FIND.TMP FIND.EXE
  270.  
  271.    **********************************************************
  272.  
  273.    PERMIT MORE THEN 10 MISMATCHES IN COMP.COM
  274.  
  275.      I have patched COMP.COM to permit 50 mismatches as follows:
  276.  
  277.    DEBUG COMP.COM
  278.    -E 08E2<cr>
  279.    xxxx:08E2   0A.32<cr>
  280.    -E 0BF8<cr>
  281.    xxxx:0BF8   31.35<cr>
  282.    -W<cr>
  283.    -Q<cr>
  284.  
  285.    **********************************************************
  286.  
  287.    ECHO OFF
  288.  
  289.      I have patched COMMAND.COM to set the default to echo off to
  290.    to obviate the need for the ECHO OFF and CLS statements at the beginning 
  291.    of a batch file.
  292.  
  293.    DEBUG COMMAND.COM
  294.    -E 1967<cr>
  295.    xxxx:1967   01.00<cr>
  296.    -W<cr>
  297.    -Q<cr>
  298.  
  299.                         -----------------------
  300.  
  301.              My thanks to Bob, Ward, and others for their patches.
  302.  
  303.          Comments to:  --  Ted Eyrick  [72446,317] CIS, IBMPC SIG --
  304.  
  305.  
  306.    Edited by:
  307.    Jim Gainsley [76703,1007]
  308.    (SysOp) IBMPC SIG
  309.    CompuServe
  310.    8-9-85
  311.